package com.ehotting.eaf.core.domain.system.api;

import com.ehotting.eaf.core.annotation.Excel;
import com.ehotting.eaf.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * C端软件版本管理对象 app_version
 * 
 * @author edsta
 * @date 2023-04-07
 */
public class AppVersion extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** C端最新版本号 */
    @Excel(name = "C端最新版本号")
    private String appVersionCode;

    /** C端最先版本名称 */
    @Excel(name = "C端最先版本名称")
    private String appVersionName;

    /**
     * 平台名称：Linux/Windows
     */
    private String platform;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishDate;

    /** C端应用版本使用状态
     * 0 正常
     * 1 提醒更新，当前接口仍然可以使用
     * 2 强制更新，当前接口已经不适合业务使用
     * */
    @Excel(name = "C端应用版本使用状态 " +
            "0 正常 " +
            "1 提醒更新，当前接口仍然可以使用 " +
            "2 强制更新，当前接口已经不适合业务使用")
    private String appVersionState;

    /** 安装包路径 */
    @Excel(name = "安装包路径")
    private String packagePath;

    /** 更新公告 */
    @Excel(name = "更新公告")
    private String content;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date insertTime;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setAppVersionCode(String appVersionCode) 
    {
        this.appVersionCode = appVersionCode;
    }

    public String getAppVersionCode() 
    {
        return appVersionCode;
    }
    public void setAppVersionName(String appVersionName) 
    {
        this.appVersionName = appVersionName;
    }

    public String getAppVersionName() 
    {
        return appVersionName;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    public void setPublishDate(Date publishDate)
    {
        this.publishDate = publishDate;
    }

    public Date getPublishDate() 
    {
        return publishDate;
    }
    public void setAppVersionState(String appVersionState)
    {
        this.appVersionState = appVersionState;
    }

    public String getAppVersionState()
    {
        return appVersionState;
    }
    public void setPackagePath(String packagePath) 
    {
        this.packagePath = packagePath;
    }

    public String getPackagePath() 
    {
        return packagePath;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setInsertTime(Date insertTime) 
    {
        this.insertTime = insertTime;
    }

    public Date getInsertTime() 
    {
        return insertTime;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("appVersionCode", getAppVersionCode())
            .append("appVersionName", getAppVersionName())
            .append("publishDate", getPublishDate())
            .append("appVersionState", getAppVersionState())
            .append("packagePath", getPackagePath())
            .append("content", getContent())
            .append("insertTime", getInsertTime())
            .append("userId", getUserId())
            .toString();
    }
}
